package net.tycmc.cty.ctyms.timejob.iems.job;

import java.util.Map;
import net.tycmc.cty.ctyms.timejob.common.DateControl;
import net.tycmc.cty.ctyms.timejob.iems.service.DutyTimeSectionService;

import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.springframework.scheduling.quartz.QuartzJobBean;

public class DutyTimeSectionJob extends QuartzJobBean {

	/**
	 * 工作时间分段统计作业 jinjiayu
	 */
	@Override
	protected void executeInternal(JobExecutionContext arg0)
			throws JobExecutionException {
		
		String start = DateControl.getDateTime(0);
		System.out.println("-----工作时间分段统计作业开始------开始时间："+start);
		
		Map<?, ?> datamap = arg0.getJobDetail().getJobDataMap();
		DutyTimeSectionService  dutyTimeSectionService = (DutyTimeSectionService)datamap.get("dutyTimeSectionService");
		dutyTimeSectionService.startExecu();
		
		System.out.println("-----工作时间分段统计作业结束------执行时间："+DateControl.getMiaoShu(start,DateControl.getDateTime(0)));
	}
}
